package com.tempjob.app.vo;

import com.tempjob.common.utils.DateUtilsEx;
import com.tempjob.common.utils.IDCardUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author hui
 * @Date 2024/11/4 15:58
 **/

@Data
@ApiModel("申请记录")
public class JobApplyUserListVO {

    @ApiModelProperty("申请id")
    private String id;

    @ApiModelProperty("申请时间")
    private String applyTime;

    @ApiModelProperty("确认时间")
    private String confirmTime;

    @ApiModelProperty("申请状态：1已申请2不合适3已录用4已删除")
    private Integer applyStatus;

    @ApiModelProperty("用户id")
    private String userId;

    @ApiModelProperty("姓名")
    private String realName;

    @ApiModelProperty("手机号码")
    private String mobile;

    @ApiModelProperty("身份证号码")
    private String identNo;

    @ApiModelProperty("身份证地址")
    private String identAddress;

    @ApiModelProperty("未知男女")
    private String sex;

    @ApiModelProperty("出生日期")
    private String birthday;

    private Integer age;

    public Integer getAge() {
        age = IDCardUtil.getAge(identNo);
        return age;
    }

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("状态0未认证1已认证")
    private Integer userStatus;

    @ApiModelProperty("学历")
    private String education;

    @ApiModelProperty("个人优势")
    private String advantage;

    @ApiModelProperty("求职状态：1求职中2在职求职")
    private Integer hireStatus;

    @ApiModelProperty("参加工作时间yyyy-MM")
    private Date startWorkTime;

    private Integer workYear;

    public Integer getWorkYear() {
        if (startWorkTime != null) {
            workYear = DateUtilsEx.getYears(startWorkTime);
        }
        return workYear;
    }
}
